<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>案例</title>
    <style>
        canvas{background-color:lightblue;}
    </style>
</head>
<body>
<canvas id="canvas" width="300px" height="300px">您的浏览器不支持</canvas>
<script>
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext('2d');
    ctx.translate(200, 100);
    ctx.beginPath();
    ctx.save();
    ctx.arc(0,0,50,0,Math.PI*2,true);
    ctx.strokeStyle = "rgba(0,0,0,0)";
    ctx.fillStyle = "#F5DEB3";
    ctx.fill();
    ctx.stroke();
    ctx.restore();
    ctx.beginPath();
    for(var i=0;i<4;i++){
        ctx.rotate(Math.PI/2);
        ctx.moveTo(45,0);
        ctx.lineTo(50,0);
    }
    ctx.stroke();


    ctx.beginPath();
    ctx.moveTo(0, 0);
    ctx.lineTo(0, -35);
    ctx.rotate(Math.PI/2);
    ctx.moveTo(0, 0);
    ctx.lineTo(0, -35);
    ctx.strokeStyle = "#4682B4";
    ctx.stroke();

</script>
</body>
</html>